<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%><%@ include file="/include.inc.jsp"%>
<c:import url="../_frag/pager/pagerForm.jsp"></c:import>

<form method="post" rel="pagerForm" action="<c:url value='/management/menu/secondlist'/>" onsubmit="return navTabSearch(this)">
<div class="pageHeader">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>关键词：</label>
				<input type="text" name="keywords" value="${param.keywords}"/>
			</li>
			<li>
				<label>状态：</label>
				<select name="status">
					<option value="">全部</option>
					<c:forEach var="item" items="${menuStatusList}">
					<c:if test="${item ne 'DELETED'}">
					<option value="${item}" ${item eq param.status ? 'selected="selected"' : ''}>${item}</option>
					</c:if>
					</c:forEach>
				</select>
			</li>
		</ul>
		<div class="subBar">
			<ul>						
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
			</ul>
		</div>
	</div>
</div>
</form>

<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" target="navTab" rel="menuNav" href="<c:url value='/management/menu/secondAdd'/>" title="添加菜单"><span>添加</span></a></li>
			<li><a class="edit" target="navTab" rel="menuNav" href="<c:url value='/management/menu/secondEdit/{slt_objId}'/>" title="编辑菜单"><span>编辑</span></a></li>
			<li><a class="delete" target="ajaxTodo" href="<c:url value='/management/menu/delete/{slt_objId}'/>" title="你确定要删除吗?"><span>删除</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="5%">ID</th>
				<th >父级菜单</th>
				<th width="15%" orderField="NAME" class="${param.orderField eq 'NAME' ? param.orderDirection : ''}">菜单名称</th>
				<th width="15%" orderField="LEVEL" class="${param.orderField eq 'LEVEL' ? param.orderDirection : ''}">菜单关键字</th>
				<th width="5%" orderField="LEVEL" class="${param.orderField eq 'LEVEL' ? param.orderDirection : ''}">菜单事件</th>
				<th width="10%" orderField="LEVEL" class="${param.orderField eq 'LEVEL' ? param.orderDirection : ''}">菜单等级</th>
				<th width="10%" orderField="CREATE_TIME" class="${param.orderField eq 'CREATE_TIME' ? param.orderDirection : ''}">创建时间</th>
				<th width="10%" orderField="UPDATE_TIME" class="${param.orderField eq 'UPDATE_TIME' ? param.orderDirection : ''}">修改时间</th>
				<th width="10%" orderField="STATUS" class="${param.orderField eq 'STATUS' ? param.orderDirection : ''}">菜单状态</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach var="item" items="${userList}" varStatus="s">
			<tr target="slt_objId" rel="${item.wechatMenu.id }">
				<td>${s.index + 1}</td>
				<td>
				<c:forEach items="${fmenuList }" var="fm">
				 <c:if test="${fm.wechatMenu.code eq item.wechatMenu.parentCode}">${fm.wechatMenu.name }</c:if>
				</c:forEach>
				</td>
				<td>${item.wechatMenu.name }</td>
				<td>${item.wechatMenu.keyName }</td>
				<td>${item.wechatMenu.eventName }</td>
				<td>${item.wechatMenu.level }</td>
				<td><fmt:formatDate value="${item.wechatMenu.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td><fmt:formatDate value="${item.wechatMenu.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td>${item.wechatMenu.status }</td>
				<td>
					<c:choose>
						<c:when test="${item.wechatMenu.status eq 'INACTIVE'}">
							<a class="unit" target="ajaxTodo" href="/management/menu/active/${item.wechatMenu.id}">ACTIVE</a>
						</c:when>
						<c:when test="${item.wechatMenu.status eq 'ACTIVE'}">
							<a class="unit" target="ajaxTodo" href="/management/menu/inactive/${item.wechatMenu.id}">INACTIVE</a>
						</c:when>
					</c:choose>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>

	<c:import url="../_frag/pager/panelBar.jsp"></c:import>
</div>